﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="UserNotificationInfoHeader.cs" company="YellowFish">
//   Copyright © YellowFish 2009
// </copyright>
// <summary>
//   Contains information about notification events.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace MobilePal.WindowsNative.Notification
{
  #region Imported Namespaces


  using System.Runtime.InteropServices;


  #endregion


  /// <summary>
  /// Contains information about notification events.
  /// </summary>
  [StructLayout(LayoutKind.Sequential)]
  public class UserNotificationInfoHeader
  {
    /// <summary>
    /// Notification handle.
    /// </summary>
    public int hNotification;

    /// <summary>
    /// Status.
    /// </summary>
    public int dwStatus;

    /// <summary>
    /// Notification trigger.
    /// </summary>
    public UserNotificationTrigger pcent;

    /// <summary>
    /// Notification object.
    /// </summary>
    public UserNotification pceun;

    /// <summary>
    /// Handle to the notification.
    /// </summary>
    public int Handle
    {
      get
      {
        return hNotification;
      }

      set
      {
        hNotification = value;
      }
    }

    /// <summary>
    /// Indicates current state of the notification.
    /// </summary>
    public NotificationStatus Status
    {
      get
      {
        return (NotificationStatus)dwStatus;
      }

      set
      {
        dwStatus = (int)value;
      }
    }

    /// <summary>
    /// The <see cref="P:OpenNETCF.WindowsCE.Notification.UserNotificationInfoHeader.UserNotificationTrigger"/> object.
    /// </summary>
    public UserNotificationTrigger UserNotificationTrigger
    {
      get
      {
        return pcent;
      }

      set
      {
        pcent = value;
      }
    }

    /// <summary>
    /// The <see cref="P:OpenNETCF.WindowsCE.Notification.UserNotificationInfoHeader.UserNotification"/> object.
    /// </summary>
    public UserNotification UserNotification
    {
      get
      {
        return pceun;
      }

      set
      {
        pceun = value;
      }
    }
  }
}